using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MyCount : MonoBehaviour
{
    // Update is called once per frame
    void Update()
    {
        GetComponent<TextMeshProUGUI>().text = MyGameManager.Instance.num.ToString();
    }

    public void count() {
        MyGameManager.Instance.num++;
        if(MyGameManager.Instance.num  >10)
        {
            SceneManager.LoadScene(1);
        }
    }
}
